/**
 * ====================================================
 * 文件名称: BulkstockCategoryActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年9月23日			chenxy(创建:创建文件)
 * ====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.bulkstock.action.v1;

import java.math.BigDecimal;
import java.util.List;

import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockCategory;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockCategoryDetail;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockInfoDetail;
import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/**
 * @author chenxy
 * @ClassName: BulkstockCategoryActionApi
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2015年9月23日 下午7:24:54
 */
public interface BulkstockCategoryActionApi {

	@Permission
	@Action(version = FinVersion1.class, description = "同步商品类别")
	public void syncBulkstockCategory();

	@Action(version = FinVersion1.class, description = "删除商品类型")
	public void disableBulkstockCategory(
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID") Long templateId
    );
	
	@Permission
	@Action(version = FinVersion1.class, description = "启用商品类别")
	public void activeBulkstockCategory(
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID") Long bulkstockCategoryId	
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "停用商品类别")
	public void deprecatedBulkstockCategory(
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID") Long bulkstockCategoryId	
	);
	
	@Action(version = FinVersion1.class, description = "大宗商品类别列表(适用下拉自动补全)")
	public PageList<BulkstockCategory> inquireBulkstockCategoryPageListByKeyword(
			@Parameter(name = "keyword", description = "类别名称", nullable = true) String keyword,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
    );

	@Action(version = FinVersion1.class, description = "获取大宗商品类别明细")
	public BulkstockCategoryDetail inquireBulkstockCategoryDetail(
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID") Long bulkstockCategoryId
    );
	
	@Action(version = FinVersion1.class, description = "大宗商品类别列表")
	public PageList<BulkstockCategory> inquireBulkstockCategoryPageList(
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID", nullable = true) Long bulkstockCategoryId,
			@Parameter(name = "beginUpdateDate", description = "最早修改时间", nullable = true) String beginUpdateDate,
			@Parameter(name = "endUpdateDate", description = "最晚修改时间", nullable = true) String endUpdateDate,
			@Parameter(name = "activeState", description = "是否启用", nullable = true) Boolean activeState,
			@Parameter(name = "categoryName", description = "类别名称", nullable = true) String categoryName,
			@Parameter(name = "productType", description = "产品类型", nullable = true) Integer productType,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
    );
	
	@Action(version = FinVersion1.class, description = "新增大宗商品类别")
	public Long createBulkstockCategory(
			@Parameter(name = "categoryName", description = "大宗类别名称") String categoryName,
			@Parameter(name = "isFactoring", description = "是否保理业务") Boolean isFactoring,
			@Parameter(name = "templateId", description = "融资模板ID") Long[] templateId,
			@Parameter(name = "templateName", description = "模板名称") String[] templateName,
			@Parameter(name = "checkedRequired", description = "是否必选 0:未定/1:必选") Integer[] checkedRequired
	);

	@Action(version = FinVersion1.class, description = "更新商品融资材料模板")
	public void updateMaterialTemplate(
			@Parameter(name = "categoryName", description = "大宗类别名称") String categoryName,
			@Parameter(name = "bulkstockCategoryId", description = "大宗类别ID") Long bulkstockCategoryId,
			@Parameter(name = "templateId", description = "融资模板ID") Long[] templateId,
			@Parameter(name = "templateName", description = "模板名称") String[] templateName,
			@Parameter(name = "checkedRequired", description = "是否必选 0:未定/1:必选") Integer[] checkedRequired
    );
	
	//======================================================================================================================//	
	@Action(version = FinVersion1.class, description = "大宗商品列表")
	public PageList<BulkstockInfoDetail> inquireBulkstockPageList(
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID", nullable = true) Long bulkstockCategoryId,
			@Parameter(name = "keyword", description = "商品名称", nullable = true) String keyword,
            @Parameter(name = "page", description = "分页参数") PageCriteria page
    );
	
	@Action(version = FinVersion1.class, description = "大宗商品列表")
	public List<BulkstockInfoDetail> inquireEnterpriseBulkstockList(
			@Parameter(name = "enterpriseId", description = "商品类别ID", nullable = true) Long enterpriseId,
			@Parameter(name = "keyword", description = "商品名称", nullable = true) String keyword
    );

	@Action(version = FinVersion1.class, description = "大宗商品列表")
	public PageList<BulkstockInfoDetail> inquireBulkstockInfoPageList(
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID", nullable = true) Long bulkstockCategoryId,
			@Parameter(name = "categoryName", description = "商品类别名称", nullable = true) String categoryName,
			@Parameter(name = "bulkstockName", description = "商品名称", nullable = true) String bulkstockName,
			@Parameter(name = "specificationName", description = "规格型号", nullable = true) String specificationName,
			@Parameter(name = "activeState", description = "是否启用", nullable = true) Boolean activeState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	@Permission
	@Action(version = FinVersion1.class, description = "同步商品信息")
	public void syncBulkstockInfo(
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID") Long bulkstockCategoryId	
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询商品信息")
	public BulkstockInfoDetail inquireBulkstockInfo(
			@Parameter(name = "bulkstockInfoId", description = "商品类别ID") Long bulkstockInfoId	
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "同步到仓储系统")
	public void syncCargoInfo(
			@Parameter(name = "bulkstockInfoId", description = "商品类别ID") Long bulkstockInfoId	
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "更新商品规格")
	public void updateBulkstockInfo(
			@Parameter(name = "bulkstockInfoId", description = "商品ID") Long bulkstockInfoId,
			@Parameter(name = "bulkstockName", description = "商品名称") String bulkstockName,
			@Parameter(name = "bulkstockNumber", description = "商品编号") String bulkstockNumber,
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID") Long bulkstockCategoryId,
			@Parameter(name = "specificationName", description = "新商品规格") String specificationName,
			@Parameter(name = "bulkstockGrade", description = "商品等级", nullable = true) String bulkstockGrade,
			@Parameter(name = "grossWeight", description = "毛重") BigDecimal grossWeight,
			@Parameter(name = "netWeight", description = "净重") BigDecimal netWeight,
			@Parameter(name = "volume", description = "体积", nullable = true) BigDecimal volume,
			@Parameter(name = "price", description = "价格", nullable = true) BigDecimal price,
			@Parameter(name = "originalPlace", description = "产地") String originalPlace,
			@Parameter(name = "countingUnit", description = "计数单位") String countingUnit,
			@Parameter(name = "reducedUnit", description = "换算单位", nullable = true) String reducedUnit,
			@Parameter(name = "conversionRelation", description = "换算关系", nullable = true) String conversionRelation
//			@Parameter(name = "conversionFactor", description = "换算系数 体积以m³为标准,重量以kg为标准 比如计价为吨的，则系数为0.001") BigDecimal conversionFactor
    );

	@Permission
	@Action(version = FinVersion1.class, description = "新建商品信息")
	public String createBulkstockInfo(
			@Parameter(name = "bulkstockName", description = "商品名称") String bulkstockName,
			@Parameter(name = "bulkstockNumber", description = "商品编号") String bulkstockNumber,
			@Parameter(name = "bulkstockCategoryId", description = "商品类别ID") Long bulkstockCategoryId,
			@Parameter(name = "bulkstockInfoId", description = "源商品ID") Long bulkstockInfoId,
			@Parameter(name = "specificationName", description = "新商品规格") String specificationName,
			@Parameter(name = "bulkstockGrade", description = "商品等级", nullable = true) String bulkstockGrade,
			@Parameter(name = "grossWeight", description = "毛重") BigDecimal grossWeight,
			@Parameter(name = "netWeight", description = "净重") BigDecimal netWeight,
			@Parameter(name = "volume", description = "体积", nullable = true) BigDecimal volume,
			@Parameter(name = "price", description = "价格", nullable = true) BigDecimal price,
			@Parameter(name = "originalPlace", description = "产地") String originalPlace,
			@Parameter(name = "countingUnit", description = "计数单位") String countingUnit,
			@Parameter(name = "reducedUnit", description = "换算单位", nullable = true) String reducedUnit,
			@Parameter(name = "conversionRelation", description = "换算关系", nullable = true) String conversionRelation
//			@Parameter(name = "conversionFactor", description = "换算系数 体积以m³为标准,重量以kg为标准 比如计价为吨的，则系数为0.001") BigDecimal conversionFactor
    );
	
	@Permission
	@Action(version = FinVersion1.class, description = "启用商品信息")
	public void activeBulkstockInfo(
			@Parameter(name = "bulkstockInfoId", description = "商品类别ID") Long bulkstockInfoId	
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "停用商品信息")
	public void deprecatedBulkstockInfo(
			@Parameter(name = "bulkstockInfoId", description = "商品类别ID") Long bulkstockInfoId	
	);
}
